import numpy as np

# 创建一维数组——向量
arr1 = np.array( [1,2,3] )
print(arr1) # [1 2 3]

# 创建二维数组——行矩阵 1行n列 为行矩阵
arr2 = np.array( [ [1,2,3] ] )
print(arr2) # [[1 2 3]]

# 创建二维数组——列矩阵 n行1列 为列矩阵
arr3 = np.array( [ [1],[2],[3] ] )
print(arr3)
"""
[[1]
 [2]
 [3]]
"""
# 创建二维数组——矩阵 (2行3列)
arr4 = np.array( [ [1,2,3],[4,5,6] ] )
print(arr4)
"""
[[1 2 3]
 [4 5 6]]
"""
